import request from '@/utils/request';
import { api } from './../api'

const { 
    userList,
    pwdTypeList,
    addUserPost,
    editUserPost,
    resetPwd,
    deleteUser,
    roleList,
    addRolePost,
    editRolePost,
    deleteRole,
    systemNameList,
    deptList,
    menuList,
    addMenu,
    editMenu,
    deleteMenu,
    addDept,
    editDept,
    deleteDept,
    roleManList,
    batUserRole,
    editUserRole,
    roleAuthList,
    batUserRoleAuth,
    editUserRoleAuth,
    editAdminUserRole,
    editAdminUserRoleAuth,
    batAdminUserRole,
    batAdminUserRoleAuth,
    dictList,
    editDict,
    addDict,
    deleteDict,
    dictKeyList,
    addKeyDict,
    editKeyDict,
    deleteKeyDict
} = api
export function queryUserList(data) {
    return request(userList, {
        data: data,
        method: 'POST',
    });
}

export function queryPwdTypeList(data) {
    return request(pwdTypeList, {
        data: data,
        method: 'POST',
    });
}

export function addUser(data) {
    return request(addUserPost, {
        data: data,
        method: 'POST',
    });
}

export function editUser(data) {
    return request(editUserPost, {
        data: data,
        method: 'POST',
    });
}

export function resetPwdPost(data) {
    return request(resetPwd, {
        data: data,
        method: 'POST',
    });
}

export function deleteUserPost(data) {
    return request(deleteUser, {
        data: data,
        method: 'POST',
    });
}

export function queryRoleList(data) {
    return request(roleList, {
        data: data,
        method: 'POST',
    });
}

export function addRole(data) {
    return request(addRolePost, {
        data: data,
        method: 'POST',
    });
}

export function editRole(data) {
    return request(editRolePost, {
        data: data,
        method: 'POST',
    });
}

export function deleteRolePost(data) {
    return request(deleteRole, {
        data: data,
        method: 'POST',
    });
}

export function systemNameListPost(data) {
    return request(systemNameList, {
        data: data,
        method: 'POST',
    });
}

export function queryDeptList(data) {
    return request(deptList, {
        data: data,
        method: 'POST',
    });
}

export function queryMenuList(data) {
    return request(menuList, {
        data: data,
        method: 'POST',
    });
}

export function addMenuPost(data) {
    return request(addMenu, {
        data: data,
        method: 'POST',
    });
}

export function editMenuPost(data) {
    return request(editMenu, {
        data: data,
        method: 'POST',
    });
}

export function deleteMenuPost(data) {
    return request(deleteMenu, {
        data: data,
        method: 'POST',
    });
}

export function addDeptPost(data) {
    return request(addDept, {
        data: data,
        method: 'POST',
    });
}

export function editDeptPost(data) {
    return request(editDept, {
        data: data,
        method: 'POST',
    });
}

export function deleteDeptPost(data) {
    return request(deleteDept, {
        data: data,
        method: 'POST',
    });
}

export function queryRoleManList(data) {
    return request(roleManList, {
        data: data,
        method: 'POST',
    });
}

export function batUserRolePost(data) {
    return request(batUserRole, {
        data: data,
        method: 'POST',
    });
}

export function editUserRolePost(data) {
    return request(editUserRole, {
        data: data,
        method: 'POST',
    });
}

export function editAdminUserRolePost(data) {
    return request(editAdminUserRole, {
        data: data,
        method: 'POST',
    });
}

export function queryRoleAuthList(data) {
    return request(roleAuthList, {
        data: data,
        method: 'POST',
    });
}

export function batUserRoleAuthPost(data) {
    return request(batUserRoleAuth, {
        data: data,
        method: 'POST',
    });
}

export function editUserRoleAuthPost(data) {
    return request(editUserRoleAuth, {
        data: data,
        method: 'POST',
    });
}

export function editAdminUserRoleAuthPost(data) {
    return request(editAdminUserRoleAuth, {
        data: data,
        method: 'POST',
    });
}

export function batAdminUserRolePost(data) {
    return request(batAdminUserRole, {
        data: data,
        method: 'POST',
    });
}

export function batAdminUserRoleAuthPost(data) {
    return request(batAdminUserRoleAuth, {
        data: data,
        method: 'POST',
    });
}

export function queryDictList(data) {
    return request(dictList, {
        data: data,
        method: 'POST',
    });
}

export function editDictPost(data) {
    return request(editDict, {
        data: data,
        method: 'POST',
    });
}

export function addDictPost(data) {
    return request(addDict, {
        data: data,
        method: 'POST',
    });
}

export function deleteDictPost(data) {
    return request(deleteDict, {
        data: data,
        method: 'POST',
    });
}

export function queryDictKeyList(data) {
    return request(dictKeyList, {
        data: data,
        method: 'POST',
    });
}

export function addKeyDictPost(data) {
    return request(addKeyDict, {
        data: data,
        method: 'POST',
    });
}

export function editKeyDictPost(data) {
    return request(editKeyDict, {
        data: data,
        method: 'POST',
    });
}

export function deleteKeyDictPost(data) {
    return request(deleteKeyDict, {
        data: data,
        method: 'POST',
    });
}